package action;

import java.util.List;

import org.apache.struts2.components.ActionComponent;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.util.ValueStack;

import bean.UserBean;
import service.UserServiceI;
import util.BaseAction;

public class TestAction extends BaseAction{

	private UserServiceI userService;
	

	public void setUserService(UserServiceI userService) {
		this.userService = userService;
	}

	@Override
	public String execute() throws Exception {
	
		return null;
	}
	
	public String list(){
		List<UserBean> userList=userService.getUserList();
		
		ValueStack valuestack=ActionContext.getContext().getValueStack();
		
		valuestack.set("userList", userList);
		
		return "main";
	}
	
}
